<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.tietiao.com/functions" prefix="my"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<script>
$(function() {
	$('#moreId').mouseenter(function(){
		$('.more-list').show();
		$('.more-list').mouseleave(function(){
			$(this).hide();
		});
	});
});
</script>
<div class="wrapper-content">
	<div class="teaser alt">
		<div class="wrapper-content-title">
			<a id="time_sort_id" href="javascript:order('time_sort_id')" class="sort ${orderBy == 'UPLOADER_TIME DESC' ? 'sort-time-selected' : orderBy == 'UPLOADER_TIME ASC' ? 'sort-time-selected ascending' : 'sort-time' }">按时间&nbsp;</a>
			<a id="hot_sort_id" href="javascript:order('hot_sort_id')" class="sort ${orderBy == 'TIETIAO_NUM DESC' ? 'sort-hot-selected' : orderBy == 'TIETIAO_NUM ASC' ? 'sort-hot-selected ascending' : 'sort-hot' }">按贴条&nbsp;</a>
		</div>
	</div>
	<div class="person-lists" style="${pageNo == 0 ? '' : 'display:none'}"></div>
	<div class="group" style="${pageNo == 1 ? '' : 'display:none'}">
		<ul>
			<li class="${lableId==-1? 'group-selected':'' }">
				<a href="#" onclick="attentionComm('friend_friends_commodity.htm','-1',this)">全部</a>
			</li>
			<li class="${lableId==-2? 'group-selected':'' }">
				<a href="#" onclick="attentionComm('friend_friends_commodity.htm','-2',this)">${userId==user.userId? '我':'TA'}分享的图片</a>
			</li>
			<li class="${lableId==-3? 'group-selected':'' }">
				<a href="#" onclick="attentionComm('friend_friends_commodity.htm','-3',this)">${userId==user.userId? '我':'TA'}贴条的图片</a>
			</li>
			<c:forEach items="${favorites}" var="comm" begin="0" end="3" >
				<c:choose>
					<c:when test="${comm.favoriteId==lableId}">
						<li>
							<a class="group-selected" href="#" onclick="attentionComm('friend_friends_commodity.htm','${comm.favoriteId}',this);return false;">${comm.favoriteName}</a>
						</li>	
					</c:when>
					<c:otherwise>
						<li>
							<a href="#" onclick="attentionComm('friend_friends_commodity.htm','${comm.favoriteId}',this);return false;">${comm.favoriteName}</a>
						</li>
					</c:otherwise>
				</c:choose>	
			</c:forEach>
			<c:if test="${fn:length(favorites)>=4}">
				<li class="more-li"><a href="#" id="moreId">更多</a>
					<ul class="more-list">
						<c:forEach items="${favorites}" var="comm" begin="5">
							<li><a href="#" onclick="attentionComm('friend_friends_commodity.htm','${comm.favoriteId}',this);return false;">${comm.favoriteName}</a></li>
						</c:forEach>
					</ul>
				</li>
			</c:if>
		</ul>
	</div>
	<div class="inside-content" id="commodity_infos_id">
	<c:import url="../commodity/browse_loadCommodityInfos.jsp"/>
	</div>
</div>	
